package vo
{
	import define.Localization;

	import flash.filesystem.File;

	public class ItemDescription
	{
		public function ItemDescription()
		{
			_l = Localization.instance;

			_bossAcquisitions = [];
			_vendorAcquisitions = [];
			_vendorAcquisitionsDetail = [];
		}
		// Drop: Zone - Boss(DownType)
		private var _bossAcquisitions:Array;
		// Vendor: Token * Cost
		private var _vendorAcquisitions:Array;
		private var _vendorAcquisitionsDetail:Array;

		public var acquisitionComment:String;

		public var acquisitionID:int;

		public function get acquisition():String
		{
			var array:Array = _bossAcquisitions.concat(_vendorAcquisitions);
			return array.join(File.lineEnding);
		}
		private static var _l:Localization;

		public function addBossAcquisition(zone_name:String, restrict_name:String, boss_name:String, down_type:String):void
		{
			var zoneRestrict:String = zone_name;
			if(restrict_name != "")
				zoneRestrict = zoneRestrict + "(" + restrict_name + ")";

			_bossAcquisitions.push(
				zoneRestrict + " - " + boss_name + " - " + down_type);
		}

		public function addVendorAcquisition(vendor_type:String, cost:int):void
		{
			if(cost == 0)
				_vendorAcquisitions.push(vendor_type);
			else
				_vendorAcquisitions.push(vendor_type + " * " + cost);
		}
	}
}